<?php 
	header("Pragma: public");
	header("Expires: 0");
	header("Accept-Ranges: bytes");
	header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
	header("Content-Type: application/vnd.ms-excel");
	header('Content-Disposition: attachment; filename=spisok.xls');			
	header("Content-Transfer-Encoding: binary");
?>
<div class="students index">
<h2>
	<?php 
	__('Список студентов');
	?>
</h2>

<table cellpadding="0" cellspacing="0" class="art-article">
<tr>

	<th>ID</th>
	<th>Фамилия</th>
	<th>Имя</th>
	<th>Отчество</th>	
	<th>Факультет</th>
	<th>Специальность</th>
	<th>Курс</th>
	<th>группа</th>	
</tr>
<?php
$i = 0;
foreach ($students as $student):
$i++;
?>
	<tr>
		<td>
			<?php echo $student['id']; ?>
		</td>
		<td>
			<?php echo $student['lastname']; ?>
		</td>
		<td>
			<?php echo $student['firstname']; ?>
		</td>
		<td>
			<?php echo $student['surname']; ?>
		</td>		
		<td>
			<?php echo $student['facultet']; ?>
		</td>
		<td>
			<?php echo $student['profession']; ?>
		</td>
		<td>
			<?php echo $student['course']; ?>
		</td>
		<td>
			<?php echo $student['group']; ?>
		</td>				
	</tr>
<?php endforeach; ?>
</table>
</div>